home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / SliderDualActing / SliderDualActing.h < prev    next >
Text File  |  1995-06-12  |  2KB  |  61 lines

  1. /*************************************************************************
  2. *        Copyright (c) 1989,1990 Stone Design Corp.  All rights reserved. 
  3. *        "Do what you will, you will anyway...."-- andrew stone 4-29-90
  4. ***************************************************************************/
  5.  
  6. #import <appkit/Slider.h>
  7.  
  8. @interface SliderDualActing:Slider
  9. {
  10.     id  textPal;        // Our drone, but sometimes active textField
  11.     id    upTarget;        // Who we send the text field and mouseup message to
  12.     SEL    upAction;        // the call needed
  13.     
  14.     id  undoTarget;        // who manages our undo, we do by default
  15.     int undoPosition;   // position of undo #define
  16.     double lastValue;    // we stash the last value here for undo
  17. }
  18.  
  19.  // Initialization:
  20. + newFrame:(const NXRect *)frameRect;
  21.  
  22.  // IB sender methods:
  23. - sendTextAction:sender;          // method for textField to call
  24. - incrementDecrement:sender;      // method for inc./dec. buttons matrix
  25.  
  26.  // overridden superclass methods:
  27. - mouseDown:(NXEvent *)e;
  28. - setFloatValue:(float)aFloat;
  29. - setIntValue:(int)anInt;
  30.  
  31.  // initialization routines called by clients:
  32. - setUpTarget:anObject action:(SEL)anAction;
  33. - setUpTarget:anObject action:(SEL)anAction isContinuous:(BOOL)flag;
  34. - setMax:(double)max allowHigher:(BOOL)hi min:(double)min allowLower:(BOOL)lo;
  35. - setAltStep:(double)step whole:(BOOL)flag default:(double)value;
  36. - setFormat:(BOOL)flag left:(unsigned)l right:(unsigned)r;
  37.  
  38.  // historical smaller ones:
  39. - setDefault:(double) def;
  40. - setUpTarget:anObject;
  41. - setUpAction:(SEL)anAction;
  42.  
  43.  // archive methods:   
  44. - read:(NXTypedStream *)stream;
  45. - write:(NXTypedStream *)stream;
  46.  
  47.  
  48.  // UNDO methods
  49. - setLastThing:(int)thing;        // we call this before doing anything
  50. - undo;                            // we will know how to restore field and 
  51. - _sendSetLastThing;            // set old value before changing
  52. - setUndoTarget:targ tag:(int)pos;  // else client object handles it
  53.  
  54.  // Misc and private:
  55. - _sendIt;                        // to send upAction to upTarget
  56. - (BOOL) isDecimal;
  57. - textPal;
  58. - setTextPal:anObject;            // connect to textField in IB
  59.  
  60. @end
  61.